package klass.parse.domain;

import java.util.HashMap;
import java.util.Map;

public class MajorVersion {

    private short value;

    private static Map<Integer, String> majorVersionMap;

    static {
        majorVersionMap = new HashMap<Integer, String>();
        majorVersionMap.put(45, "JDK 1.1");
        majorVersionMap.put(46, "JDK 1.2");
        majorVersionMap.put(47, "JDK 1.3");
        majorVersionMap.put(48, "JDK 1.4");
        majorVersionMap.put(49, "Java SE 5.0");
        majorVersionMap.put(50, "Java SE 6.0");
        majorVersionMap.put(51, "Java SE 7.0");
        majorVersionMap.put(52, "Java SE 8.0");
        majorVersionMap.put(53, "Java SE 9.0");
        majorVersionMap.put(54, "Java SE 10.0");
    }

    public MajorVersion(short value) {
        this.value = value;
    }

    @Override
    public String toString() {
        return majorVersionMap.get((int) value);
    }
}
